<!DOCTYPE html>
<html lang="en">

  <head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>inline-block布局的缺陷</title>
  </head>
  <style>
    /* 
    inline-block布局的缺陷
      1.如果盒子里面有文字：排布会受vertical-align影响
      2.两个盒子之间有空隙，并且空隙与font-size有关
    
     */
    .div1 {
      width: 100px;
      height: 100px;
      background-color: pink;
      display: inline-block;
    }

    .div2 {
      width: 100px;
      height: 100px;
      background-color: blue;
      display: inline-block;
    }
  </style>

  <body>
    <div class="div1"></div>
    <div class="div2">div2</div>
  </body>

</html>